<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
class UserProfiles 
{
	public function __construct()
    {
        //echo "in";
    }
	public function login(){
		$CI =& get_instance();
		$CI->load->model('Users');
		//$username="ss@dd.c";
		//$password="asd";
		$username=$CI->input->post('email');
		$password=$CI->input->post('password');
		$l = $CI->Users->validate($username,$password);
		//echo $l;
		if($l){
			$loggedin = array(
				'username' => $username,
				'logged_in' => true
			);
			$CI->session->set_userdata($loggedin);
			//echo "Login Successful". $l;
                        redirect('test');
		}
		else{
			$data["result"]="Login Failed";
			$CI->load->view('createprofile_view',$data);
		}
		
	}
    public function isRegistred()
    {
        echo "in method";
    }
    public function logout()
    {
        echo "in method";
    }
    public function searchFriend()
    {
        echo "in method";
    }
    public function showInformation()
    {
        echo "in method";
    }
    public function updateProfile()
    {
        echo "in method";
    }
	public function UserProfile()
    {
        echo "in method";
    }

	

}